package com.itheima.cloud.controller;


import com.itheima.cloud.mapper.OrderMapper;
import com.itheima.cloud.pojo.Order;
import com.itheima.cloud.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    OrderService orderService;
    @GetMapping("/findOrderByUserId")
   public List<Order> findOrderByUserId(@RequestParam("username") String username){
     return orderService.findOrderByUserId(username);
   }
}
